package com.lzc.tlmail.tlmailorder.feign;

import com.lzc.common.to.SkuWareVo;
import com.lzc.common.utils.R;
import com.lzc.tlmail.tlmailorder.vo.LockWareOrdervo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author lzc
 * @create 2020-10-21 12:21
 */
@FeignClient("ware-service")
public interface WareFeignService {
    /**
     * 查询是否有库存
     * @param skuIds
     * @return
     */
    @PostMapping("/ware/waresku/hasstock")
    List<SkuWareVo> getSkusHasStock(@RequestBody List<Long> skuIds);

    /**
     * 锁定库存
     * @param lockWareOrdervo
     * @return
     */
    @PostMapping("/ware/waresku/lockWareOrder")
    R lockWareOrder(@RequestBody LockWareOrdervo lockWareOrdervo);
}
